package com.azt.api.service;

import com.azt.api.dto.member.MemberExt;
import com.azt.api.dto.member.MemberParam;
import com.azt.api.pojo.CenCollection;
import com.azt.api.pojo.Member;
import com.azt.api.pojo.MemberDetail;
import com.azt.model.page.Pagination;
import com.azt.model.page.TPagination;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface MemberService {
	public Pagination selectMemberList(int pageno, int pagesize,Map<String, String> params);

	public void saveMember(Member member);

	public Member selectMemberByid(Integer id);
	
	/**
	 * 根据公司id获取当前签约期内可用的的唯一集采供应商
	 * @Title: getSignMemberByCompanyId 
	 * @Description: TODO
	 * @param companyId
	 * @return
	 * @return: Member
	 * @author: zhoudongdong 2017年3月3日 上午10:19:11
	 */
	public Member getSignMemberByCompanyId(Integer companyId);

	public void addMemberDetailList(MemberDetail[] memberDetailArr);

	public List<MemberDetail> selectMemberDetailsBymid(Integer mid);

    List<MemberDetail> findMyMemberDetail(int memberId);

    public Member selectMemberByCompanyId(String startdate, String mid);

	Double getTotalPayPrice(int orderType, int sellerCompanyId, Date sdate, Date edate);

	public CenCollection selectEnqCollection(Integer state, Integer memberId);

	public Pagination selectCenCollectionList(int pageno, int pagesize,Map<String, String> params);


	List<Map> searchMemberProduct(Map param);

	/**
	 * 判断是否是有效的集采供应商(返回null则表示不是)
	 * */
    Member getCenMember(int companyId);

    List<CenCollection> findCollectionByMember(int memberId);

	/**
	 * 集采返点（询价订单、商城订单通用）
	 * */
    void calcMemberCollection(int companyId);

	/**
	 * 集采供应商首页
	 * Created by 张栋 on 2017/2/14 11:12
	 */
	TPagination<MemberExt> geteMembersByParam(MemberParam param);
	
	/**
	 * 批量更新或者更新一个
	 * @Title: updateCenCollection 
	 * @Description: TODO
	 * @return: void
	 * @author: zhoudongdong 2017年2月23日 下午4:39:50
	 */
	public void updateCenCollection(CenCollection collection,List<CenCollection> collectionList);

    TPagination<MemberExt> getMembersExtByParam(MemberParam param);


	List<CenCollection> getMingXiCollection(int memberId, Integer state);

	public void updateCenMember(Member member);

    int getReachedStage(int memberId);
}
